package IC.AST;

import IC.SemanticException;

/**
 * AST visitor interface. Declares methods for visiting each type of AST node.
 * 
 * @author Tovi Almozlino
 */
public interface Visitor {

	public Object visit(Program program) throws SemanticException;

	public Object visit(ICClass icClass) throws SemanticException;

	public Object visit(Field field) throws SemanticException;

	public Object visit(VirtualMethod method) throws SemanticException;

	public Object visit(StaticMethod method) throws SemanticException;

	public Object visit(LibraryMethod method) throws SemanticException;

	public Object visit(Formal formal) throws SemanticException;

	public Object visit(PrimitiveType type) throws SemanticException;

	public Object visit(UserType type) throws SemanticException;

	public Object visit(Assignment assignment) throws SemanticException;

	public Object visit(CallStatement callStatement) throws SemanticException;

	public Object visit(Return returnStatement) throws SemanticException;

	public Object visit(If ifStatement) throws SemanticException;

	public Object visit(While whileStatement) throws SemanticException;

	public Object visit(Break breakStatement) throws SemanticException;

	public Object visit(Continue continueStatement) throws SemanticException;

	public Object visit(StatementsBlock statementsBlock) throws SemanticException;

	public Object visit(LocalVariable localVariable) throws SemanticException;

	public Object visit(VariableLocation location) throws SemanticException;

	public Object visit(ArrayLocation location) throws SemanticException;

	public Object visit(StaticCall call) throws SemanticException;

	public Object visit(VirtualCall call) throws SemanticException;

	public Object visit(This thisExpression) throws SemanticException;

	public Object visit(NewClass newClass) throws SemanticException;

	public Object visit(NewArray newArray) throws SemanticException;

	public Object visit(Length length) throws SemanticException;

	public Object visit(MathBinaryOp binaryOp) throws SemanticException;

	public Object visit(LogicalBinaryOp binaryOp) throws SemanticException;

	public Object visit(MathUnaryOp unaryOp) throws SemanticException;

	public Object visit(LogicalUnaryOp unaryOp) throws SemanticException;

	public Object visit(Literal literal) throws SemanticException;

	public Object visit(ExpressionBlock expressionBlock) throws SemanticException;
	
}
